home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / HENSA / MATHS / PLPLOT / PLPLOT.ZIP / examples / tcl / x02.tcl < prev    next >
Text File  |  1994-06-30  |  863b  |  40 lines

  1. # $Id: x02.tcl,v 1.1 1994/06/30 18:49:34 mjl Exp $
  2. # $Log: x02.tcl,v $
  3. # Revision 1.1  1994/06/30  18:49:34  mjl
  4. # Tcl demo programs, which fully reproduce their x??c counterpart.
  5. #
  6. #----------------------------------------------------------------------------
  7. # PLplot Tcl demo #2
  8. #
  9. # After sourcing, just type "2".
  10. #----------------------------------------------------------------------------
  11.  
  12. proc 2 {} {
  13.  
  14.     plbop
  15.  
  16. # Divide screen into 16 regions
  17.  
  18.     plssub 4 4
  19.     plschr 0.0 3.5
  20.     plfont 4
  21.  
  22.     for {set i 0} {$i < 15} {incr i} {
  23.     plcol $i
  24.     pladv
  25.     set vmin 0.1
  26.     set vmax 0.9
  27.     for {set j 0} {$j <= 2} {incr j} {
  28.         plwid [expr $j+1]
  29.         plvpor $vmin $vmax $vmin $vmax
  30.         plwind 0.0 1.0 0.0 1.0
  31.         plbox "bc" 0.0 0 "bc" 0.0 0
  32.         set vmin [expr $vmin+0.1]
  33.         set vmax [expr $vmax-0.1]
  34.     }
  35.     plwid 1
  36.     plptex 0.5 0.5 1.0 0.0 0.5 $i
  37.     }
  38.     pleop
  39. }
  40.